<!DOCTYPE HTML>

<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Map</title>

    <link media="screen" type="text/css"
          href="<?php echo HSUrl::home() ?>/css/hs.css" rel="stylesheet">

    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta content="initial-scale=1.0,width=device-width" name="viewport">
    <?php
    Yii::app()->clientScript->registerCoreScript('jquery');
    ?>
    <script type="text/javascript"
            src="https://maps.googleapis.com/maps/api/js?key=<?php echo Yii::app()->params['API_key'] ?>">
    </script>
    <link media="screen" type="text/css"
          href="<?php echo HSUrl::home() ?>/css/responsive.css" rel="stylesheet">
</head>

<body>
<div style="clear: both"></div>
<div style="width: 100%;height: 100%;">
    <div id="header" style="display: block;">
        <div style="width: 70%;display: inline-block">
            <h2 style="display: inline">
                <a href="<?php echo HSUrl::home() ?>" id="logo">
                    <?php echo Yii::app()->params['site_name'] ?>
                </a>
            </h2>
            <!--            <h2 id="description">--><?php //echo Yii::app()->params['slogan'] ?><!--</h2>-->
        </div>

        <div class="menu-main-container" id="navigation">
            <ul class="menu" id="dropmenu">
                <li>
                    <a href="<?php echo HSUrl::getCreateCompanyUrl() ?>" style="line-height: 40px;">Đăng ký công ty</a>
                </li>
                <li>
                    <a href="<?php echo HSUrl::getCreateAdsUrl() ?>" style="line-height: 60px;">Đăng rao vặt</a>
                </li>
                <li>
                    <!--                    <a href="-->
                    <?php //echo HSUrl::getContactUrl() ?><!--" style="line-height: 40px;">Contact</a>-->
                </li>
            </ul>
            <select id="selectMenu">
                <?php $selected_page = HSCommon::getCurrentUrl();

                $select_home = false;
                $select_company = false;
                $select_ad = false;
                switch ($selected_page) {
                    case HSUrl::home():
                        $select_home = true;
                        break;
                    case HSUrl::getCreateCompanyUrl():
                        $select_company = true;
                        break;
                    case HSUrl::getCreateAdsUrl():
                        $select_ad = true;
                        break;
                    default:
                        $select_home = true;
                        break;
                };
                ?>
                <option <?php echo $select_home ? "selected ='selected'" : "" ?> value="<?php echo HSUrl::home() ?>">
                    Trang chủ
                </option>
                <!--                <option value="Lấy vị trí hiện tại">Lấy vị trí hiện tại</option>-->
                <option
                    <?php echo $select_company ? "selected ='selected'" : "" ?>value="<?php echo HSUrl::getCreateCompanyUrl() ?>">
                    Đăng ký công ty
                </option>
                <option
                    <?php echo $select_ad ? "selected ='selected'" : "" ?> value="<?php echo HSUrl::getCreateAdsUrl() ?>">
                    Đăng rao vặt
                </option>
                <!--                <option value="--><?php //echo HSUrl::getContactUrl() ?><!--">Contact</option>-->

            </select>
        </div>

        <div class="clear"></div>
    </div>
    <div class="main-content row">
        <div class="col-md-12">
            <?php echo $content ?>
        </div>
    </div>
</div>
<div style="clear: both"></div>
<script type="text/javascript">

    $(document).ready(function () {

        $("#selectMenu").change(function () {
            var $val = $(this).val();
            document.location = $val;
        })

    });

</script>
</body>
</html>
